{% extends "index.html" %}
{% block title %}
    添加用户
{% endblock %}
{% block linkcss %}
    {{ super() }}
    <link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">
{% endblock %}
{% block page_nav %}
	<li>用户</li>
	<li>添加用户</li>
{% endblock %}
{#页面内容#}
{% block content %}
    <!--查询条件-->
    <div class="row">
        <div class="col-md-4 col-md-offset-4">
            <div class="card">
                <div class="row">
                    <div class="col-md-10 col-md-offset-1">
                        <div class="card-title">
                            <h3>添加用户</h3>
                        </div>
                        <form class="form-group" method="POST" action="{{ url_for('view.user_register') }}">
                            <label for="email" class="sr-only">Email</label>
                            <input type="text" id="email" class="form-control text-center" placeholder="Email" required
                                   autofocus
                                   name="email">
                            <label for="password" class="sr-only">密码</label>
                            <input type="password" id="password" class="form-control text-center" placeholder="密码" required
                                   name="password">
                            <label for="company" class="sr-only">公司</label>
                            <input type="text" id="company" class="form-control" placeholder="公司名称" required
                                   name="company">
                            <label for="company_address" class="sr-only">公司地址</label>
                            <input type="text" id="company_address" class="form-control" placeholder="公司地址" required
                                   name="company_address">
                            <label for="linkman" class="sr-only">联系人</label>
                            <input type="text" id="linkman" class="form-control" placeholder="联系人" required
                                   name="linkman">
                            <label for="phone_number" class="sr-only">手机号码</label>
                            <input type="text" id="phone_number" class="form-control" placeholder="手机号码 11位"
                                   required
                                   name="phone_number" maxlength="11">
                            <label for="authority" class="sr-only">权限</label>
                            <select class="form-control text-center" id="authority" name="authority">
                                <option value="super_admin">超级管理员</option>
                                <option value="com_admin">公司管理员</option>
                                <option value="com_person">公司普通人员</option>
                            </select>
                            <div class="card-footer">
                                <button class="btn btn-lg btn-primary btn-block submit_bn" type="submit">提交</button>
                            </div>
                            {% if messages %}
                                <div class="alert alert-warning">
                                    {% for message in messages %}
                                        {% for key in messages[message] %}
                                            <p><strong class="text-center">{{ key }}</strong></p>
                                        {% endfor %}
                                    {% endfor %}
                                </div>
                            {% endif %}
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
{% endblock %}

